package com.aids_malaria.http.response;

import com.aids_malaria.http.request.ConSymptom;
import com.aids_malaria.http.request.MicroResults;
import com.aids_malaria.http.request.Symptom;
import com.aids_malaria.util.GsonUtil;

import java.io.Serializable;

public class DiagnosisInfo implements Serializable {

    private String identity_code; //身份码
    private int record_no; //诊断记录号
    private int diagnosis_result; //诊断结果 0 正常 1 确诊病例 2 疑似病例
    private String report_time; // 报告时间
    private String report_unit; //报告单位
    private String reportor; // 报告人
    private String clinical_symptoms; // 临床症状
    private String con_symptoms; // 兼症
    private String onset_place; // 发病地点
    private String diagnostics; // 诊断者
    private String diagnostic_time; // 诊疗时间
    private String micro_results; // 镜检结果
    private float protozoan_density; // 原虫密度
    private float gametophyte_carry_rate; // 配子体携带率
    private float mtf_gametophyte_rate; // 雌雄配子体比率
    private String micro_examiner; // 镜检者
    private String micro_time; // 镜检时间
    private String rdt_result; // rdt检查结果
    private String rdt_checker; // rdt检查人
    private int is_roea; // 2周内是否有其他流行区居留史  1 是；0否
    private String ea_place; // 流行区地点
    private String oea_place; // 其它流行区地点
    private int is_visitor_fever; // 近1月内家庭成员或来访亲友是否有人发热
    private int infection_source_type; // 感染来源分类  1本县感染2省内外县感染3外省感染4境外感染
    private String investor;
    private String create_time;
    private String update_time;
    private String onset_place_detail;
    private String rdt_check_time;
    private int is_transfusion_twoweek; //发病前2周内是否有输血史
    private String invest_time;

    public static DiagnosisInfo copyFromPack(DiagnosisInfoPack diagnosisInfoPack){
        DiagnosisInfo diagnosisInfo = new DiagnosisInfo();
        diagnosisInfo.setIdentity_code(diagnosisInfoPack.getIdentity_code());
        diagnosisInfo.setRecord_no(diagnosisInfoPack.getRecord_no());
        diagnosisInfo.setDiagnosis_result(diagnosisInfoPack.getDiagnosis_result());
        diagnosisInfo.setReport_time(diagnosisInfoPack.getReport_time());
        diagnosisInfo.setReport_unit(diagnosisInfoPack.getReport_unit());
        diagnosisInfo.setReportor(diagnosisInfoPack.getReportor());
        // 临床症状
        diagnosisInfo.setClinical_symptoms(GsonUtil.beanToJson(diagnosisInfoPack.getClinical_symptoms_json()));
        //  兼症
        diagnosisInfo.setCon_symptoms(GsonUtil.beanToJson(diagnosisInfoPack.getCon_symptoms_json()));

        diagnosisInfo.setOnset_place(diagnosisInfoPack.getOnset_place());
        diagnosisInfo.setDiagnostics(diagnosisInfoPack.getDiagnostics());
        diagnosisInfo.setDiagnostic_time(diagnosisInfoPack.getDiagnostic_time());
        //  镜检结果
        diagnosisInfo.setMicro_results(GsonUtil.beanToJson(diagnosisInfoPack.getMicro_results_json()));

        diagnosisInfo.setProtozoan_density(diagnosisInfoPack.getProtozoan_density());
        diagnosisInfo.setGametophyte_carry_rate(diagnosisInfoPack.getGametophyte_carry_rate());
        diagnosisInfo.setMtf_gametophyte_rate(diagnosisInfoPack.getMtf_gametophyte_rate());
        diagnosisInfo.setMicro_examiner(diagnosisInfoPack.getMicro_examiner());
        diagnosisInfo.setMicro_time(diagnosisInfoPack.getMicro_time());

        //  rdt检查结果
        diagnosisInfo.setRdt_result(GsonUtil.beanToJson(diagnosisInfoPack.getRdt_result_json()));

        diagnosisInfo.setRdt_checker(diagnosisInfoPack.getRdt_checker());
        diagnosisInfo.setIs_roea(diagnosisInfoPack.getIs_roea());
        diagnosisInfo.setEa_place(diagnosisInfoPack.getEa_place());
        diagnosisInfo.setOea_place(diagnosisInfoPack.getOea_place());
        diagnosisInfo.setIs_visitor_fever(diagnosisInfoPack.getIs_visitor_fever());
        diagnosisInfo.setInfection_source_type(diagnosisInfoPack.getInfection_source_type());
        diagnosisInfo.setInvestor(diagnosisInfoPack.getInvestor());
        diagnosisInfo.setCreate_time(diagnosisInfoPack.getCreate_time());
        diagnosisInfo.setUpdate_time(diagnosisInfoPack.getUpdate_time());
        diagnosisInfo.setOnset_place_detail(diagnosisInfoPack.getOnset_place_detail());
        diagnosisInfo.setRdt_check_time(diagnosisInfoPack.getRdt_check_time());
        diagnosisInfo.setIs_transfusion_twoweek(diagnosisInfoPack.getIs_transfusion_twoweek());
        diagnosisInfo.setInvest_time(diagnosisInfoPack.getInvest_time());

        return diagnosisInfo;
    }

    public String getIdentity_code() {
        return identity_code;
    }

    public void setIdentity_code(String identity_code) {
        this.identity_code = identity_code;
    }

    public int getRecord_no() {
        return record_no;
    }

    public void setRecord_no(int record_no) {
        this.record_no = record_no;
    }

    public int getDiagnosis_result() {
        return diagnosis_result;
    }

    public void setDiagnosis_result(int diagnosis_result) {
        this.diagnosis_result = diagnosis_result;
    }

    public String getReport_time() {
        return report_time;
    }

    public void setReport_time(String report_time) {
        this.report_time = report_time;
    }

    public String getReport_unit() {
        return report_unit;
    }

    public void setReport_unit(String report_unit) {
        this.report_unit = report_unit;
    }

    public String getReportor() {
        return reportor;
    }

    public void setReportor(String reportor) {
        this.reportor = reportor;
    }

    public String getClinical_symptoms() {
        return clinical_symptoms;
    }

    public void setClinical_symptoms(String clinical_symptoms) {
        this.clinical_symptoms = clinical_symptoms;
    }

    public String getCon_symptoms() {
        return con_symptoms;
    }

    public void setCon_symptoms(String con_symptoms) {
        this.con_symptoms = con_symptoms;
    }

    public String getOnset_place() {
        return onset_place;
    }

    public void setOnset_place(String onset_place) {
        this.onset_place = onset_place;
    }

    public String getDiagnostics() {
        return diagnostics;
    }

    public void setDiagnostics(String diagnostics) {
        this.diagnostics = diagnostics;
    }

    public String getDiagnostic_time() {
        return diagnostic_time;
    }

    public void setDiagnostic_time(String diagnostic_time) {
        this.diagnostic_time = diagnostic_time;
    }

    public String getMicro_results() {
        return micro_results;
    }

    public void setMicro_results(String micro_results) {
        this.micro_results = micro_results;
    }

    public float getProtozoan_density() {
        return protozoan_density;
    }

    public void setProtozoan_density(float protozoan_density) {
        this.protozoan_density = protozoan_density;
    }

    public float getGametophyte_carry_rate() {
        return gametophyte_carry_rate;
    }

    public void setGametophyte_carry_rate(float gametophyte_carry_rate) {
        this.gametophyte_carry_rate = gametophyte_carry_rate;
    }

    public float getMtf_gametophyte_rate() {
        return mtf_gametophyte_rate;
    }

    public void setMtf_gametophyte_rate(float mtf_gametophyte_rate) {
        this.mtf_gametophyte_rate = mtf_gametophyte_rate;
    }

    public String getMicro_examiner() {
        return micro_examiner;
    }

    public void setMicro_examiner(String micro_examiner) {
        this.micro_examiner = micro_examiner;
    }

    public String getMicro_time() {
        return micro_time;
    }

    public void setMicro_time(String micro_time) {
        this.micro_time = micro_time;
    }

    public String getRdt_result() {
        return rdt_result;
    }

    public void setRdt_result(String rdt_result) {
        this.rdt_result = rdt_result;
    }

    public String getRdt_checker() {
        return rdt_checker;
    }

    public void setRdt_checker(String rdt_checker) {
        this.rdt_checker = rdt_checker;
    }

    public int getIs_roea() {
        return is_roea;
    }

    public void setIs_roea(int is_roea) {
        this.is_roea = is_roea;
    }

    public String getEa_place() {
        return ea_place;
    }

    public void setEa_place(String ea_place) {
        this.ea_place = ea_place;
    }

    public String getOea_place() {
        return oea_place;
    }

    public void setOea_place(String oea_place) {
        this.oea_place = oea_place;
    }

    public int getIs_visitor_fever() {
        return is_visitor_fever;
    }

    public void setIs_visitor_fever(int is_visitor_fever) {
        this.is_visitor_fever = is_visitor_fever;
    }

    public int getInfection_source_type() {
        return infection_source_type;
    }

    public void setInfection_source_type(int infection_source_type) {
        this.infection_source_type = infection_source_type;
    }

    public String getInvestor() {
        return investor;
    }

    public void setInvestor(String investor) {
        this.investor = investor;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public String getOnset_place_detail() {
        return onset_place_detail;
    }

    public void setOnset_place_detail(String onset_place_detail) {
        this.onset_place_detail = onset_place_detail;
    }

    public String getRdt_check_time() {
        return rdt_check_time;
    }

    public void setRdt_check_time(String rdt_check_time) {
        this.rdt_check_time = rdt_check_time;
    }

    public int getIs_transfusion_twoweek() {
        return is_transfusion_twoweek;
    }

    public void setIs_transfusion_twoweek(int is_transfusion_twoweek) {
        this.is_transfusion_twoweek = is_transfusion_twoweek;
    }

    public String getInvest_time() {
        return invest_time;
    }

    public void setInvest_time(String invest_time) {
        this.invest_time = invest_time;
    }

    @Override
    public String toString() {
        return "DiagnosisInfo{" +
                "identity_code='" + identity_code + '\'' +
                ", record_no=" + record_no +
                ", diagnosis_result=" + diagnosis_result +
                ", report_time='" + report_time + '\'' +
                ", report_unit='" + report_unit + '\'' +
                ", reportor='" + reportor + '\'' +
                ", clinical_symptoms='" + clinical_symptoms + '\'' +
                ", con_symptoms='" + con_symptoms + '\'' +
                ", onset_place='" + onset_place + '\'' +
                ", diagnostics='" + diagnostics + '\'' +
                ", diagnostic_time='" + diagnostic_time + '\'' +
                ", micro_results='" + micro_results + '\'' +
                ", protozoan_density=" + protozoan_density +
                ", gametophyte_carry_rate=" + gametophyte_carry_rate +
                ", mtf_gametophyte_rate=" + mtf_gametophyte_rate +
                ", micro_examiner='" + micro_examiner + '\'' +
                ", micro_time='" + micro_time + '\'' +
                ", rdt_result='" + rdt_result + '\'' +
                ", rdt_checker='" + rdt_checker + '\'' +
                ", is_roea=" + is_roea +
                ", ea_place='" + ea_place + '\'' +
                ", oea_place='" + oea_place + '\'' +
                ", is_visitor_fever=" + is_visitor_fever +
                ", infection_source_type=" + infection_source_type +
                ", investor='" + investor + '\'' +
                ", create_time='" + create_time + '\'' +
                ", update_time='" + update_time + '\'' +
                ", onset_place_detail='" + onset_place_detail + '\'' +
                ", rdt_check_time='" + rdt_check_time + '\'' +
                ", is_transfusion_twoweek=" + is_transfusion_twoweek +
                ", invest_time='" + invest_time + '\'' +
                '}';
    }
}
